using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ImageAcquisitionTAL;
using HomeDms.Properties;

namespace HomeDms
{
    public partial class ScanForm : Form
    {
        public ScanForm()
        {
            InitializeComponent();
        }

        public Image ScannedImage
        {
            get
            {
                return pictureBox3.Image;
            }
        }

        IAcquisitionTechnology tech;

        private void ScanForm_Load(object sender, EventArgs e)
        {
            tech = ImageAcquisitionTechnologyFactory.SelectSupportedTechnology();
            //tech = new NoTechnology();
            comboBox1.DataSource = tech.GetInstalledScanners();
            comboBox1.SelectedItem = tech.GetScanner(Settings.Default.DefaultScanner);
        }

        private void toolStripButton4_Click(object sender, EventArgs e)
        {

        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            pictureBox3.Image = tech.Acquire(((Scanner)comboBox1.SelectedItem).DeviceID);
        }
    }
}